
<?php
    $url = new Url();
    $arr_region = LoadConfig::$region;

    //var_dump($arr_region);
?>
<script type="text/javascript" src="<?php echo Yii::app()->params['static_url']?>js/jquery.maskedinput.js"></script>
<script type="text/javascript">

    loadBoxTienIch();

    loadBoxVip();

    loadBoxKetQua();
    
    $(document).ready(function(){
        $('#input_chuky').mask("99");
    });

    function loadBoxKetQua(){
        var url = "<?=$url->createUrl('home/boxketqua');?>";
        $.ajax({
            type: "POST",
            url: url,
            global: false,
            data:{},
            success: function(msg){
                $("#boxketqua").html(msg);
            }
        });
    }

    function loadBoxTienIch(){
        var url = "<?=$url->createUrl('home/boxtienich');?>";
        $.ajax({
            type: "POST",
            url: url,
            global: false,
            data:{},
            success: function(msg){
                $("#boxtienich").html(msg);
            }
        });
    }

    function loadBoxVip(){
        var url = "<?=$url->createUrl('home/boxvip');?>";
        $.ajax({
            type: "POST",
            url: url,
            global: false,
            data:{},
            success: function(msg){
                $("#boxvip").html(msg);
            }
        });
    }

</script>

<div class="leftMain">
    <div class="titleCHAT"> Thống kê chu kỳ loto </div>
    <div class="SM">
        <form action="<?php echo Yii::app()->createUrl('vip/tkchuky');?>" method="post">
            <div class="searchSM">
                <input name="boso" type="text" value="00" placeholder="Nhập bộ số" size="5" maxlength="100" class="boxsearchSM" id="input_chuky" />
                <!--<a href="javascript:void(0);" onclick="timchuky();" class="buttonsearchSMS">Thống kê</a>-->
                <input type="submit" value="Thống kê" class="buttonsearchSMS">
            </div>
        </form>
        <div class="searchLetters" id="chuky"></div>

        <?php if(isset($data)){?>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr class="bg_cam">
                    <td class="SM_1"><p>Bộ Số</p></td>
                    <td class="SM_1"><p>Độ dài chu kỳ </p></td>
                    <td class="SM_1"><p>Ngày về</p></td>
                </tr>
            </table>
            <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#e6e6e6">

                <?php for($i=0;$i<count($data);$i++){?>
                    <tr class="bg_white">
                        <td class="SM_1">
                            <?php echo $data[$i]['boso'];?>
                        </td>
                        <td class="SM_1">
                            <?php echo $data[$i]['dodai_chuky'];?>
                        </td>
                        <td class="SM_1">
                            <?php echo $data[$i]['end_date'];?>
                        </td>
                    </tr>
                    <?php }?>
            </table>
            <?php }?>
    </div>
</div>

<div class="rightMain">

    <div class="Box" id="boxvip"></div>

    <div class="Box" id="boxtienich"></div>

    <div class="Box" id="boxketqua"></div>

</div>

<div class="both"></div>